/* eslint-disable */
// @ts-ignore
import request from '@/http/vue-query';
import { CustomRequestOptions_ } from '@/http/types';

import * as API from './types';

/** 接受视频通话 POST /webrtc/private/accept */
export function webrtcPrivateAcceptUsingPost({
  params,
  body,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.WebrtcPrivateAcceptUsingPostParams;
  body: API.WebrtcPrivateAcceptUsingPostBody;
  options?: CustomRequestOptions_;
}) {
  return request<API.Result>('/webrtc/private/accept', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    params: {
      ...params,
    },
    data: body,
    ...(options || {}),
  });
}

/** 呼叫视频通话 POST /webrtc/private/call */
export function webrtcPrivateCallUsingPost({
  params,
  body,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.WebrtcPrivateCallUsingPostParams;
  body: API.WebrtcPrivateCallUsingPostBody;
  options?: CustomRequestOptions_;
}) {
  return request<API.Result>('/webrtc/private/call', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    params: {
      // mode has a default value: video
      mode: 'video',
      ...params,
    },
    data: body,
    ...(options || {}),
  });
}

/** 取消呼叫 POST /webrtc/private/cancel */
export function webrtcPrivateCancelUsingPost({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.WebrtcPrivateCancelUsingPostParams;
  options?: CustomRequestOptions_;
}) {
  return request<API.Result>('/webrtc/private/cancel', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 同步candidate POST /webrtc/private/candidate */
export function webrtcPrivateCandidateUsingPost({
  params,
  body,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.WebrtcPrivateCandidateUsingPostParams;
  body: API.WebrtcPrivateCandidateUsingPostBody;
  options?: CustomRequestOptions_;
}) {
  return request<API.Result>('/webrtc/private/candidate', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    params: {
      ...params,
    },
    data: body,
    ...(options || {}),
  });
}

/** 呼叫失败 POST /webrtc/private/failed */
export function webrtcPrivateFailedUsingPost({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.WebrtcPrivateFailedUsingPostParams;
  options?: CustomRequestOptions_;
}) {
  return request<API.Result>('/webrtc/private/failed', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 挂断 POST /webrtc/private/handup */
export function webrtcPrivateHandupUsingPost({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.WebrtcPrivateHandupUsingPostParams;
  options?: CustomRequestOptions_;
}) {
  return request<API.Result>('/webrtc/private/handup', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 心跳 POST /webrtc/private/heartbeat */
export function webrtcPrivateHeartbeatUsingPost({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.WebrtcPrivateHeartbeatUsingPostParams;
  options?: CustomRequestOptions_;
}) {
  return request<API.Result>('/webrtc/private/heartbeat', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 拒绝视频通话 POST /webrtc/private/reject */
export function webrtcPrivateRejectUsingPost({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.WebrtcPrivateRejectUsingPostParams;
  options?: CustomRequestOptions_;
}) {
  return request<API.Result>('/webrtc/private/reject', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}
